package com.dzpk.gameserver.util;

import com.dzpk.gameserver.module.player.Player;
import org.apache.mina.core.session.IoSession;

/**
 * Created by somnus on 16/10/16.
 */
public class Utils {
    public static Player getPlayer(IoSession session) {
        return (Player) session.getAttribute(GameServerConstants.SIGN_SESSION_PLAYER);
    }
    public static void bindPlayer(Player player, IoSession session){
        session.setAttribute(GameServerConstants.SIGN_SESSION_PLAYER, player);
    }
}


